#include <stdio.h>

//https://www.nowcoder.com/practice/1304bb23c2e344989d5c7a578d263e4c?tpId=290&tags=&title=&difficulty=0&judgeStatus=0&rp=0&sourceUrl=%2Fexam%2Foj%2Fta%3FtpId%3D290

int main() {
    int num = 0;
    int count = 0;
    while (scanf("%d", &num) != EOF) {
        count = num * num;
        while (count--) {
            printf("* ");
            if (count % num == 0) {
                printf("\n");
            }
        }
    }
    return 0;
}